class SetsController < ApplicationController
  # Lists the sets of photographs for a user on flickr.
  def index
    @gallery = Gallery.instance
    @set_list = @gallery.flickr.photosets.getList(LIGHTBOX_CONFIG[:flickr_user_id])
  end
  # Fetches a list of photographs in a set.
  def list
    if params[:id]
      @gallery = Gallery.instance
      @set = @gallery.flickr.photosets.getInfo(params[:id])
      @photos = @gallery.flickr.photosets.getPhotos(params[:id])
    else
      redirect_to(:action => 'index')
    end
  end
end
